class TreeLayerOp {
    /**
     * 勾选事件
     * @param {*} checkedKeys 
     * @param {*} e 
     * @param {*} parentHandler 
     */
    onCheck(checkedKeys, e, parentHandler) {
        CIM.layerTree.layerTreeDom.setLiveLayerViewCheck(checkedKeys, e.checked);
        if (e.node.dataRef.children) {
            let num = e.node.dataRef.children.length;
            for (let i = 0; i < num; i++) {
                parentHandler.$set(e.node.dataRef.children[i], "checked", e.checked);
            }
        } else {
            parentHandler.$set(e.node.dataRef, "checked", e.checked);
        }
    }
    /**
     * 定位到图层
     * @param {object} node 树节点
     */
    zoomToLayer(node) {
        CIM.layerTree.zoomToLayerById(node.id);
    }
}
export default new TreeLayerOp();